<?PHP

	class tpl_activation {
		
		public static function activation(){
		
			$user_html = '';
			$class = 'td2';
			foreach($GLOBALS['OUTPUT']->users as $uid=>$name){
				$user_html .= <<<EOV
<tr>
	<td class='$class' width='80%'>{$name['name']}</td>
	<td class='$class' width='20%'><a href='./index.php?act=admin&page=activation{$GLOBALS['OUTPUT']->ses}&approve={$uid}'>[{$GLOBALS['LANG']->lang_admin->approve}]</a> <a href='./index.php?act=admin&page=activation{$GLOBALS['OUTPUT']->ses}&delete={$uid}'>[{$GLOBALS['LANG']->lang_admin->delete}]</a></td>
</tr>
EOV;
				$class = ($class == 'td2' ? 'td1' : 'td2');
			}
			
			if(empty($user_html)){
				$user_html = <<<EOV
<tr>
		<td class='td2' colspan='2' style='text-align: center; font-style: italic'>{$GLOBALS['LANG']->lang_admin->no_pending_found}</td>
	</tr>
EOV;
			}
			
			$page_html = '';
			for($curpage = 1; $curpage <= $GLOBALS['OUTPUT']->pages; $curpage++){
				$is_curpage = ($curpage == $GLOBALS['OUTPUT']->page ? ' selected="true"' : '');
				$page_html .= <<<EOV
					<option $is_curpage onclick="document.location='./index.php?act=admin&page=activation{$GLOBALS['OUTPUT']->ses}&pager={$curpage}'">{$curpage}</option>
EOV;
			}
			
			return	tpl_globals::header() .
				<<<EOV
<div class='table_header'>&nbsp;{$GLOBALS['LANG']->lang_admin->activation}</div>
<table style='width: 100%;' cellspacing='1' cellpadding='5'>
	<tr>
		<td class='table_header_row' width='80%'>{$GLOBALS['LANG']->lang_admin->username}</td>
		<td class='table_header_row' width='20%'>{$GLOBALS['LANG']->lang_admin->action}</td>
	</tr>
	{$user_html}
	<tr>
		<td class='table_header_row' width='100%' colspan='3'>{$GLOBALS['LANG']->lang_admin->page}: &nbsp;
			<select style='width: 60px;'>
				{$page_html}
			</select>
		</td>
	</tr>
</table>
EOV
.
			tpl_globals::footer();
				
		}
		
	}

?>